import request from '@/utils/request'

// 查询今日目标列表
export function listGoal(query) {
  return request({
    url: '/wx/goal/list',
    method: 'get',
    params: query
  })
}

// 查询今日目标详细
export function getGoal(id) {
  return request({
    url: '/wx/goal/' + id,
    method: 'get'
  })
}

// 新增今日目标
export function addGoal(data) {
  return request({
    url: '/wx/goal',
    method: 'post',
    data: data
  })
}

// 修改今日目标
export function updateGoal(data) {
  return request({
    url: '/wx/goal',
    method: 'put',
    data: data
  })
}

// 删除今日目标
export function delGoal(id) {
  return request({
    url: '/wx/goal/' + id,
    method: 'delete'
  })
}
